CC= CC
#CC= gcc
CPPFLAGS= $(DEBUG) -g -sb #-Wall
INCLUDES= -I.
LDFLAGS=
LDLIBS=
#LDLIBS= -liostream

.SUFFIXES= .cc.o .C.o .c.o

.cc.o :
	$(CC) $(CPPFLAGS) $(INCLUDES) -c $<

.C.o :
	$(CC) $(CPPFLAGS) $(INCLUDES) -c $<

DFASRCS= Element.C Store.C Tokens.C Final.C Digraph.C DFA.C
DFAOBJS= Element.o Store.o Tokens.o Final.o Digraph.o DFA.o

SRCS= dfa.cc $(DFASRCS)
OBJS= dfa.o $(DFAOBJS)
EXE= dfa

all : $(EXE)

$(EXE) : $(DFAOBJS) $(OBJS)
	$(CC) $(CPPFLAGS) $(INCLUDES) -o /tmp/dfa/$@ $(DFAOBJS) $(OBJS) $(LDFLAGS) $(LDLIBS)
	rm -f $@
	ln -sf /tmp/dfa/$@ $@

clean :
	rm -f *.o $(EXE) /tmp/dfa/$(EXE)

depend :
	makedepend -I. $(DFASRCS) $(SRCS) 2>/dev/null

# DO NOT DELETE THIS LINE -- make depend depends on it.

Element.o: Element.h
Store.o: Store.h Element.h Node.h Tokens.h
Tokens.o: Tokens.h Element.h Node.h
Final.o: Final.h Tokens.h Element.h Node.h Store.h States.h
Digraph.o: Digraph.h Element.h
DFA.o: DFA.h Element.h Store.h Node.h
DFA.o: Tokens.h Sigma.h States.h Final.h Digraph.h
dfa.o: DFA.h Element.h Store.h Node.h Tokens.h Sigma.h
dfa.o: States.h Final.h Digraph.h
